package com.googlecode.tinyoutliner;

import java.awt.Color;

import com.organic.maynard.outliner.util.preferences.PreferenceBoolean;
import com.organic.maynard.outliner.util.preferences.PreferenceColor;
import com.organic.maynard.outliner.util.preferences.PreferenceInt;
import com.organic.maynard.outliner.util.preferences.PreferenceString;
import com.organic.maynard.outliner.util.preferences.Preferences;

public class DefaultPreferences extends Preferences {

	private PreferenceString DEFAULT_PREF_STRING = new PreferenceString();
	private PreferenceColor DEFAULT_COLOUR = new PreferenceColor();
	private PreferenceInt DEFAULT_INT = new PreferenceInt();
	
	{
		DEFAULT_PREF_STRING.cur = "";
		DEFAULT_COLOUR.cur = new Color(0, 0, 0);
		DEFAULT_INT.cur = 0;
	}

	public DefaultPreferences() {
		PreferenceInt pi = new PreferenceInt();
		pi.cur = 600;
		super.addPreference(Preferences.RENDERER_WIDGIT_CACHE_SIZE, pi);
		PreferenceString ps = new PreferenceString();
		ps.cur = "MONOSPACED";
		super.addPreference(Preferences.FONT_FACE, ps);
		pi = new PreferenceInt();
		pi.cur = 12;
		super.addPreference(Preferences.FONT_SIZE, pi);
		PreferenceBoolean pb = new PreferenceBoolean();
		pb.cur = true;
		super.addPreference(Preferences.SHOW_LINE_NUMBERS, pb);
		super.addPreference(Preferences.SHOW_INDICATORS, pb);
		super.addPreference(Preferences.SELECTED_CHILD_COLOR, DEFAULT_COLOUR);
		super.addPreference(Preferences.TEXTAREA_FOREGROUND_COLOR, DEFAULT_COLOUR);
		super.addPreference(Preferences.TEXTAREA_BACKGROUND_COLOR, DEFAULT_COLOUR);
		super.addPreference(Preferences.PANEL_BACKGROUND_COLOR, DEFAULT_COLOUR);
		super.addPreference(Preferences.LINE_WRAP, DEFAULT_PREF_STRING);
		super.addPreference(SAVE_FORMAT, DEFAULT_PREF_STRING);
		super.addPreference(OWNER_EMAIL, DEFAULT_PREF_STRING);
		super.addPreference(OWNER_NAME, DEFAULT_PREF_STRING);
		super.addPreference(APPLY_FONT_STYLE_FOR_COMMENTS, pb);
		super.addPreference(APPLY_FONT_STYLE_FOR_EDITABILITY, pb);
		super.addPreference(APPLY_FONT_STYLE_FOR_MOVEABILITY, pb);
		super.addPreference(USE_CREATE_MOD_DATES, pb);
		super.addPreference(CREATE_MOD_DATES_FORMAT, DEFAULT_PREF_STRING);
		super.addPreference(FILE_PROTOCOL, DEFAULT_PREF_STRING);
		super.addPreference(TIME_ZONE_FOR_SAVING_DATES, DEFAULT_PREF_STRING);
		super.addPreference(RIGHT_MARGIN, DEFAULT_INT);
		super.addPreference(LEFT_MARGIN, DEFAULT_INT);
		super.addPreference(TOP_MARGIN, DEFAULT_INT);
		super.addPreference(BOTTOM_MARGIN, DEFAULT_INT);
		super.addPreference(SHOW_ATTRIBUTES, pb);
		
	}
}
